<!-- Author: Moe Kyaw Thu Aung --> 
<!-- Last Modified: 11 Sep 2012 -->
<html>
	<head>
		<title>My Book Store : Administration</title>
		<link rel="stylesheet" href="../css/admin.css" />
        <script>
			function confirm_del() {
				return confirm("Are you sure you want to delete?");
			}
		</script>
	</head>
	<body>
		<div id="wrapper">
			<div id="head">
				<h1>My Book Store : Feedback</h1>
				<a href="actions.php?do=logout">Logout</a>
			</div>

			<div id="report">
				<a class="tab" href="list.php">Item List</a> 
				<a class="tab" href="order.php">Order List</a>
				<a class="tab this" href="report.php">Feedback</a>
			<table width="100%" cellpadding="8" cellspacing="0">
					
					<?php
						$conn = mysql_connect("localhost", "root", "");
						mysql_select_db("onestopjcu", $conn);
						
						$result = mysql_query("SELECT * FROM feedback");
						
						$i = 0;
						while($row = mysql_fetch_assoc($result)) {
							$id = $row['feedback_id'];
							
							if($i % 2) $class = "even";
							else $class = "odd";
							
							echo "<tr class='$class'><td valign='top'>";
							
							echo "<div class='customer'>";
							echo "<div class='customer-name'>" . $row['feedback_fname'] ." ".$row['feedback_lname']. "</div>";
							
							echo "<div class='customer-email'>" . $row['feedback_email'] . "</div>";
							echo "<div class='feedback-phone'>" . $row['feedback_title'] . "</div>";
							echo "<div class='feedback-address'>" . $row['feedback_message'] . "</div>";
							echo "</div>";
							
							
							echo "<div class='order-item'>";
							echo "<a href='actions.php?do=fddelete&id=$id' class='action' onclick='return confirm_del()'><img src='../admin/images/del_ico.png' /></a>";
							echo "</tr></td>";
							
							$i++;
						}
					?>
					
				</table>
				
			</div>
			
			<br /><br /><br />
			
			<div id="foot">
				&copy; OneStop JCU.
			</div>

		</div>
	</body>
</html>
